<template>
  <div class="max">
    <div class="message">
      <div class="m1"  v-for="(payData,index) in payHistory " :key="index" >
        <div class="cz">
          <p v-if="payData.type ==0" class="xx">储值卡充值</p>
          <p v-if="payData.type==1" class="xx">外卖消费</p>
          <p v-if="payData.type==2" class="xx">堂食点餐</p>
          <p v-if="payData.type==3" class="xx">预约自提</p>
          <p v-if="payData.type==3" class="xx">礼品卡消费</p>
        </div>
        <span class="time">{{payData.time}}</span>
        <p class="much">{{payData.money}}</p>
      </div> 
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      payHistory:[]
    };
  },

  components: {},

  methods: {},

  created() {
   wx.request({
     url: 'http://localhost:7777/userm/payHistory?memberId=1', 
     data: 'data', 
     method: 'GET',
     success: res => {
        this.payHistory=res.data.data;
     },
     fail: () => {},
     complete: () => {}
   });
  }
};
</script>
<style>
html {
  background: #eee;
}

.max {
  display: flex;
  flex-direction: column;
}

.date {
  font-size: 17px;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  color: rgba(53, 52, 52, 1);
  line-height: 48px;
  margin: 10px 0 0 13px;
}

.message {
  width: 100%;
  height: 272px;
  background: white;
  display: flex;
  flex-direction: column;
}

.m1 {
  position: relative;
  width: 343px;
  height: 68px;
  border-bottom: 1px solid #eee;
  margin-left: 12px;
}

.cz {
  width: 113px;
  height: 13px;
  margin: 20px 0 9px 0;
}

.xx {
  font-size: 14px;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  color: rgba(53, 52, 52, 1);
  line-height: 13px;
}

.time {
  font-size: 12px;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  color: rgba(163, 165, 168, 1);
  /* line-height: 17px; */
}

.much {
  position: absolute;
  right: 5px;
  top: 10px;
  font-size: 17px;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  color: rgba(219, 90, 51, 1);
  line-height: 48px;
}

.much1 {
  position: absolute;
  top: 10px;
  right: 5px;
  font-size: 17px;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  color: rgba(2, 2, 2, 1);
  line-height: 48px;
}
</style>
